@echo off
echo 准备分享包...

REM 创建分享目录
if exist "teacher-exam-sharing" rmdir /s /q "teacher-exam-sharing"
mkdir "teacher-exam-sharing"

REM 复制必要文件
xcopy /s /e /y "src" "teacher-exam-sharing\src\"
xcopy /s /e /y "server" "teacher-exam-sharing\server\"
xcopy /s /e /y "data" "teacher-exam-sharing\data\"

copy "package.json" "teacher-exam-sharing\"
copy "Dockerfile" "teacher-exam-sharing\"
copy "docker-compose.yml" "teacher-exam-sharing\"
copy "vite.config.ts" "teacher-exam-sharing\"
copy "tsconfig.json" "teacher-exam-sharing\"
copy "tsconfig.node.json" "teacher-exam-sharing\"
copy "index.html" "teacher-exam-sharing\"
copy "*.bat" "teacher-exam-sharing\"
copy "*.sh" "teacher-exam-sharing\"
copy "*.md" "teacher-exam-sharing\"

REM 创建压缩包（需要7zip或winrar）
echo 正在创建压缩包...
if exist "C:\Program Files\7-Zip\7z.exe" (
    "C:\Program Files\7-Zip\7z.exe" a -tzip "教师监考排考系统.zip" "teacher-exam-sharing\*"
    echo 压缩包已创建: 教师监考排考系统.zip
) else (
    echo 请手动压缩 teacher-exam-sharing 文件夹
)

echo 分享包准备完成！
pause
